package com.mz.mattress.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mz.mattress.api.entity.City;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CityMapper extends BaseMapper<City> {

//    @Select("select province,city from mz_city where status=1 and deleted=0 order by province,sort desc")

    @Select("select province,city from mz_city where status=1 and deleted=0")
    List<City> list();

    Page<City> listPage(Page page, @Param("province") String province, @Param("city") String city, @Param("status") Integer status);


}
